package com.power.sifa.correction.model;


import com.plf.core.common.annotations.FieldEnumText;
import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Map;

/**
*  社区矫正人员布控人员信息实体类
*/

@Entity
@ApiModel(value="社区矫正人员布控人员信息")
@Data
@Table(name="Apl_condeploy_person",schema="sfapprove")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Apl_condeploy_person.Apl_condeploy_personPK.class) 用于复合组件
public class Apl_condeploy_person extends BaseModel implements Serializable {

	private static final long serialVersionUID = 1L;

    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "序号")
    private String id;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "性别")
    private Integer gender;

    @ApiModelProperty(value = "矫正类别")
    private Integer crctype;

    @ApiModelProperty(value = "罪名")
    private String crime;

    @ApiModelProperty(value = "身份证号")
    private String cardno;

    @ApiModelProperty(value = "矫正期限")
    private String timelong;

    @ApiModelProperty(value = "矫正开始日期")
    private String startdate;

    @ApiModelProperty(value = "矫正结束日期")
    private String enddate;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "行政区划代码")
    private String adid;

    @ApiModelProperty(value = "所属司法所id")
    private String deptid;

    @ApiModelProperty(value = "管控级别")
    private Integer controltype;

    @ApiModelProperty(value = "联系号码")
    private String phone;

    @ApiModelProperty(value = "民族")
    private Integer nation;

    @ApiModelProperty(value = "出生日期")
    private String birthym;

    @ApiModelProperty(value = "入矫日期")
    private String enterdate;

    @ApiModelProperty(value = "运营商类型")
    private Integer operators;

    @ApiModelProperty(value = "家庭住址")
    private String addr;

    @ApiModelProperty(value = "户籍地")
    private String domicile;

    @ApiModelProperty(value = "原判刑罚")
    private Integer penalty;

    @ApiModelProperty(value = "入矫类别")
    private Integer entertype;

    @ApiModelProperty(value = "曾用名")
    private String oncename;

    @ApiModelProperty(value = "执行地")
    private String exeaddr;

    @ApiModelProperty(value = "附加刑")
    private String addpenalty;

    @ApiModelProperty(value = "布控开始时间")
    private String constartdate;

    @ApiModelProperty(value = "布控结束时间")
    private String conenddate;

    @ApiModelProperty(value = "布控编号")
    private String concode;

    @ApiModelProperty(value = "社矫人员id")
    private String perid;

    // 提交时间
    @Transient
    private String subtime;

    // 流程实例id
    @Transient
    private String instid;

    /**
     * 头像url地址
     */
    @Transient
    private String avatarUrl;


    /**
     *  性别文本
     */
    @Transient
    @FieldEnumText(eum="Tp_gender", valuefield="gender")
    private String gender_text;

    /**
     *  矫正类别文本
     */
    @Transient
    @FieldEnumText(eum="Tp_crc_user", valuefield="crctype")
    private String crctype_text;

    /**
     *  管控级别文本
     */
    @Transient
    @FieldEnumText(eum="Tp_crc_ctrl", valuefield="controltype")
    private String controltype_text;

    /**
     *  民族文本
     */
    @Transient
    @FieldEnumText(eum="Tp_nation", valuefield="nation")
    private String nation_text;

    /**
     *  原判刑罚文本
     */
    @Transient
    @FieldEnumText(eum="Tp_crc_penalty", valuefield="penalty")
    private String penalty_text;

    /**
     *  入矫类别文本
     */
    @Transient
    @FieldEnumText(eum="Tp_crc_enter", valuefield="entertype")
    private String entertype_text;


    public Map<String, Object> parseMap() {
        return null;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Apl_condeploy_personPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Apl_condeploy_personPK pk = (Apl_condeploy_personPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}
